<template>
  <button @click="t()" style="color: red">
    <!-- <slot></slot> -->
    {{ title }}
  </button>
</template>
<script>
export default {
  props: {
    title: {
      type: String,
      default: "按钮默认内容",
    },
  },
  data() {
    return {};
  },
  methods: {
    t() {
      alert("3");
      this.$emit("click");
    },
  },
};
</script>

<style scoped>
</style>